import requests
def sync_vivogpt():
    data = {
        'message': "我需要1+3的答案",
        'username': "张三"
    }
    response=requests.post("http://127.0.0.1:5000/chatgpt",json=data)
    if response.status_code == 200:
        print(f'response:{response.json()}')
    else:
        print(response.status_code, response.message)

def sync_getSimilarity():
    data = {
        'message': "我非常想练习我的胳膊，还有暑假来了我想有腹肌",
        'username': "张三"
    }
    response=requests.post("http://127.0.0.1:5000/get/similarity",json=data)
    if response.status_code == 200:
        print(f'response:{response.json()["message"]}')
    else:
        print(response.status_code, response.message)

def sync_updateSimilar():
    data = {
        'message': ["HIIT训练","拉伸动作","健身操","臀部","芭蕾"],
        'username': "张三"
    }
    response=requests.post("http://127.0.0.1:5000/update/similarity",json=data)
    if response.status_code == 200:
        print(f'response:{response.json()["message"]}')
    else:
        print(response.status_code, response.message)
if __name__ == '__main__':
    sync_updateSimilar();